/*=====================================================
 Copyright (C) ETERNAL<iqstar@ms24.hinet.net>
 URL : http://www.et99.net

请仔细阅读以下许可协议。当您使用本软体，您将自动成为本协议的一方并受到本协议的约束。

软体和文档受到台湾及中国大陆著作权法及国际条约的保护。您不得：
a)营利、出租或者出借软体或文档的任何部分。
b)反向工程、分解、反编译或者企图察看软体的源代码作为商业用途。
c)修改或者改变软体，或者与其他程式结合。

许可人保留软体及文档的所有权利和权益。您不能通过本许可协定获得软体的任何所有权和知识产权。
===================================================== */
//#### view begin ####
//,sp,spmax,etc_str,etc_smart,etc_agi,etc_vit,etc_life,etc_au,etc_be
function login_view(p_win, p_lost, p_img_set, i_img, name, p_sex, ch_name, p_s, p_lv, p_exp, p_nextexp, p_money, p_hp, p_hpmax, p_str, p_smart, p_agl, p_life, p_vit, p_au, p_be, p_at, p_mat, p_df, p_mdf, a_name, body_name, head_name, hand_name, foot_name, item_name, item_name2, sat_name, p_place, p_birth, p_cdate, sp, spmax, etc_str, etc_smart, etc_agi, etc_vit, etc_life, etc_au, etc_be, act_num) {
    message_cls();
    foot_fire();
    // parent.document.getElementById("set_mainframe").rows=UI.set_rows;
    p_name = name;
    p_sat_name = sat_name;
    d_ch_name = ch_name;
    d_a_name = a_name;
    d_body_name = body_name;
    d_head_name = head_name;
    d_hand_name = hand_name;
    d_foot_name = foot_name;
    d_item_name = item_name;
    d_item2_name = item_name2;
    my_birth = birth[p_birth];
    my_age = p_cdate;
    p_lv2 = p_lv;
    show_status(p_win, p_lost, p_img_set, i_img, p_sex, p_s, p_lv, p_exp, p_nextexp, p_money, p_hp, p_hpmax, p_str, p_smart, p_agl, p_life, p_vit, p_au, p_be, p_at, p_mat, p_df, p_mdf, p_place, sp, spmax, etc_str, etc_smart, etc_agi, etc_vit, etc_life, etc_au, etc_be, act_num);
    job_work.p1 = setInterval("p1()", 1200000);
};

function show_status(p_win, p_lost, p_img_set, i_img, p_sex, p_s, p_lv, p_exp, p_nextexp, p_money, p_hp, p_hpmax, p_str, p_smart, p_agl, p_life, p_vit, p_au, p_be, p_at, p_mat, p_df, p_mdf, p_place, sp, spmax, etc_str, etc_smart, etc_agi, etc_vit, etc_life, etc_au, etc_be, act_num) {
    p_name2 = p_name;
    d_ch_name2 = d_ch_name;
    d_a_name2 = d_a_name;
    d_body_name2 = d_body_name;
    d_head_name2 = d_head_name;
    d_hand_name2 = d_hand_name;
    d_foot_name2 = d_foot_name;
    d_item_name2 = d_item_name;
    d_item2_name2 = d_item2_name;
    my_birth2 = my_birth;
    my_age2 = my_age;
    status_template(p_win, p_lost, p_img_set, i_img, p_sex, p_s, p_lv, p_exp, p_nextexp, p_money, p_hp, p_hpmax, p_str, p_smart, p_agl, p_life, p_vit, p_au, p_be, p_at, p_mat, p_df, p_mdf, p_place, 0, sp, spmax, etc_str, etc_smart, etc_agi, etc_vit, etc_life, etc_au, etc_be, act_num);
    p_c();
};

function well_view(p_win, p_lost, p_img_set, i_img, p_name, p_sex, ch_name, p_s, p_lv, p_exp, p_nextexp, p_money, p_hp, p_hpmax, p_str, p_smart, p_agl, p_life, p_vit, p_au, p_be, p_at, p_mat, p_df, p_mdf, a_name, d_name, e_name, dd_name, c_name, item_name, item_name2, p_place, p_birth, p_cdate, del_day, f_time, win_num, cp_mmoney, sp, spmax, etc_str, etc_smart, etc_agi, etc_vit, etc_life, etc_au, etc_be) {
    message_cls();
    w_c('<table>');
    w_c('<tr>');
    w_c('<td  width="63%" valign="top">');
    status_view2(p_win, p_lost, p_img_set, i_img, p_name, p_sex, ch_name, p_s, p_lv, p_exp, p_nextexp, p_money, p_hp, p_hpmax, p_str, p_smart, p_agl, p_life, p_vit, p_au, p_be, p_at, p_mat, p_df, p_mdf, a_name, d_name, e_name, dd_name, c_name, item_name, item_name2, p_place, p_birth, p_cdate, win_num, sp, spmax, etc_str, etc_smart, etc_agi, etc_vit, etc_life, etc_au, etc_be, "---");
    w_c('</td>');
    w_c('<td valign="top" class="b1">');
    chara_make(del_day, f_time);
    w_c('</td>');
    w_c('</tr>');
    w_c('</table>');
    p_c();
    setup_jmmoney(cp_mmoney);
};

function cp_view(p_win, p_lost, p_img_set, i_img, p_name, p_sex, ch_name, p_s, p_lv, p_exp, p_nextexp, p_money, p_hp, p_hpmax, p_str, p_smart, p_agl, p_life, p_vit, p_au, p_be, p_at, p_mat, p_df, p_mdf, a_name, d_name, e_name, dd_name, c_name, item_name, item_name2, p_place, p_birth, p_cdate, win_num, sp, spmax, etc_str, etc_smart, etc_agi, etc_vit, etc_life, etc_au, etc_be, act_num) {
    status_view2(p_win, p_lost, p_img_set, i_img, p_name, p_sex, ch_name, p_s, p_lv, p_exp, p_nextexp, p_money, p_hp, p_hpmax, p_str, p_smart, p_agl, p_life, p_vit, p_au, p_be, p_at, p_mat, p_df, p_mdf, a_name, d_name, e_name, dd_name, c_name, item_name, item_name2, p_place, p_birth, p_cdate, win_num, sp, spmax, etc_str, etc_smart, etc_agi, etc_vit, etc_life, etc_au, etc_be, act_num);
    p_c();
};

function status_view2(p_win, p_lost, p_img_set, i_img, name, p_sex, ch_name, p_s, p_lv, p_exp, p_nextexp, p_money, p_hp, p_hpmax, p_str, p_smart, p_agl, p_life, p_vit, p_au, p_be, p_at, p_mat, p_df, p_mdf, a_name, body_name, head_name, hand_name, foot_name, item_name, item_name2, p_place, p_birth, p_cdate, win_num, sp, spmax, etc_str, etc_smart, etc_agi, etc_vit, etc_life, etc_au, etc_be, act_num) {
    p_name2 = name;
    d_ch_name2 = ch_name;
    d_a_name2 = a_name;
    d_body_name2 = body_name;
    d_head_name2 = head_name;
    d_hand_name2 = hand_name;
    d_foot_name2 = foot_name;
    d_item_name2 = item_name;
    d_item2_name2 = item_name2;
    my_birth2 = birth[p_birth];
    my_age2 = p_cdate;
    status_template(p_win, p_lost, p_img_set, i_img, p_sex, p_s, p_lv, p_exp, p_nextexp, p_money, p_hp, p_hpmax, p_str, p_smart, p_agl, p_life, p_vit, p_au, p_be, p_at, p_mat, p_df, p_mdf, p_place, win_num, sp, spmax, etc_str, etc_smart, etc_agi, etc_vit, etc_life, etc_au, etc_be, act_num);
};

/**
 * 转换千位分隔符，wog_data.js控制
 * @param val
 * @returns {*}
 */
function translateNumber(val) {
    if (numeral && thousandSeparator) {
        return numeral(val).format('0,0')
    } else {
        return val
    }
}

function status_template(p_win, p_lost, p_img_set, i_img, p_sex, p_s, p_lv, p_exp, p_nextexp, p_money, p_hp, p_hpmax, p_str, p_smart, p_agl, p_life, p_vit, p_au, p_be, p_at, p_mat, p_df, p_mdf, p_place, win_num, sp, spmax, etc_str, etc_smart, etc_agi, etc_vit, etc_life, etc_au, etc_be, act_num) {
    var p_img = "";
    var group_name = etc_group;
    if (p_name2 == p_name) {
        base_str = p_str, base_smart = p_smart, base_agi = p_agl, base_vit = p_vit, base_life = p_life, base_au = p_au, base_be = p_be, group_name = p_group;
    }
    if (etc_str > 0) {
        etc_str = buff1 + etc_str + buff2;
    }
    if (etc_str < 0) {
        etc_str = debuff1 + etc_str + debuff2;
    }
    if (etc_str == 0) {
        etc_str = "";
    }
    if (etc_smart > 0) {
        etc_smart = buff1 + etc_smart + buff2;
    }
    if (etc_smart < 0) {
        etc_smart = debuff1 + etc_smart + debuff2;
    }
    if (etc_smart == 0) {
        etc_smart = "";
    }
    if (etc_agi > 0) {
        etc_agi = buff1 + etc_agi + buff2;
    }
    if (etc_agi < 0) {
        etc_agi = debuff1 + etc_agi + debuff2;
    }
    if (etc_agi == 0) {
        etc_agi = "";
    }
    if (etc_vit > 0) {
        etc_vit = buff1 + etc_vit + buff2;
    }
    if (etc_vit < 0) {
        etc_vit = debuff1 + etc_vit + debuff2;
    }
    if (etc_vit == 0) {
        etc_vit = "";
    }
    if (etc_life > 0) {
        etc_life = buff1 + etc_life + buff2;
    }
    if (etc_life < 0) {
        etc_life = debuff1 + etc_life + debuff2;
    }
    if (etc_life == 0) {
        etc_life = "";
    }
    if (etc_au > 0) {
        etc_au = buff1 + etc_au + buff2;
    }
    if (etc_au < 0) {
        etc_au = debuff1 + etc_au + debuff2;
    }
    if (etc_au == 0) {
        etc_au = "";
    }
    if (etc_be > 0) {
        etc_be = buff1 + etc_be + buff2;
    }
    if (etc_be < 0) {
        etc_be = debuff1 + etc_be + debuff2;
    }
    if (etc_be == 0) {
        etc_be = "";
    }
    p_s = s_status[p_s];
    if (p_img_set == 1) {
        p_img = i_img;
    } else {
        p_img = img + i_img + ".gif";
    }
    var sex = (p_sex == "1") ? "男" : "女";
    var p_strf = get_f(p_str, 4500);
    var p_smartf = get_f(p_smart, 4500);
    var p_aglf = get_f(p_agl, 4500);
    var p_lifef = get_f(p_life, 4500);
    var p_auf = get_f(p_au, 4500);
    var p_bef = get_f(p_be, 4500);
    var p_vitf = get_f(p_vit, 4500);
    var p_atf = get_f(p_at, 7500);
    var p_matf = get_f(p_mat, 7500);
    var p_dff = get_f(p_df, 7500);
    var p_mdff = get_f(p_mdf, 7500);
    var rest_up = "";
    w_c(`<div id="statusViewContainer" class="status-view-container  box-border-gradient">
    <div class="overflow-hidden">
        <div class="d-flex align-items-start mx-15-reverse">
            <div class="flex-1 px-15">
                <div class="text-center mb-10">
                    <div class="bg-header-title">
                        ${p_name} (${sex} ${my_age2}岁)
                    </div>
                </div>
                <div class="image status-view-pic-img">
                    <div class="image-container">
                        <div class="image-body">
                            <img src="${p_img}" alt="">
                        </div>
                    </div>
                </div>
                <div class="section-title mt-10">基本属性</div>
                            <div class="status-view-data">
                                <div class="status-view-data-label min">力量</div>
                                <div class="status-view-data-value flex-1 width-0">${translateNumber(p_str)}${etc_str}</div>
                            </div>
                            <div class="status-view-data">
                                <div class="status-view-data-label min">智力</div>
                                <div class="status-view-data-value flex-1 width-0">${translateNumber(p_smart) + etc_smart}</div>
                            </div>
                            <div class="status-view-data">
                                <div class="status-view-data-label min">敏捷</div>
                                <div class="status-view-data-value flex-1 width-0">${translateNumber(p_agl) + etc_agi}</div>
                            </div>
                            <div class="status-view-data">
                                <div class="status-view-data-label min">体质</div>
                                <div class="status-view-data-value flex-1 width-0">${translateNumber(p_vit) + etc_vit}</div>
                            </div>
                            <div class="status-view-data">
                                <div class="status-view-data-label min">生命</div>
                                <div class="status-view-data-value flex-1 width-0">${translateNumber(p_life) + etc_life}</div>
                            </div>
                            <div class="status-view-data">
                                <div class="status-view-data-label min">魅力</div>
                                <div class="status-view-data-value flex-1 width-0">${translateNumber(p_au) + etc_au}</div>
                            </div>
                            <div class="status-view-data">
                                <div class="status-view-data-label min">信仰</div>
                                <div class="status-view-data-value flex-1 width-0">${translateNumber(p_be) + etc_be}</div>
                            </div>
            </div>
            <div class="status-view-pic-arm px-15">
                <div class="section-title mt-10">装备</div>
                <div class="status-view-arm avg avg-2 mt-10">
                    <div class="avg-item">
                        <div class="status-view-data">
                            <div class="status-view-data-label min">武器</div>
                            <div class="status-view-data-value flex-1 width-0">${re_arm_name(d_a_name2)}</div>
                        </div>
                    </div>
                    <div class="avg-item mt-5">
                        <div class="status-view-data">
                            <div class="status-view-data-label min">头部</div>
                            <div class="status-view-data-value flex-1 width-0">${re_arm_name(d_head_name2)}</div>
                        </div>
                    </div>
                    <div class="avg-item mt-5">
                        <div class="status-view-data">
                            <div class="status-view-data-label min">身体</div>
                            <div class="status-view-data-value flex-1 width-0">${re_arm_name(d_body_name2)}</div>
                        </div>
                    </div>
                    <div class="avg-item mt-5">
                        <div class="status-view-data">
                            <div class="status-view-data-label min">手部</div>
                            <div class="status-view-data-value flex-1 width-0">${re_arm_name(d_hand_name2)}</div>
                        </div>
                    </div>
                    <div class="avg-item mt-5">
                        <div class="status-view-data">
                            <div class="status-view-data-label min">脚部</div>
                            <div class="status-view-data-value flex-1 width-0">${re_arm_name(d_foot_name2)}</div>
                        </div>
                    </div>
                    <div class="avg-item mt-5">
                        <div class="status-view-data">
                            <div class="status-view-data-label min">饰品</div>
                            <div class="status-view-data-value flex-1 width-0">${re_arm_name(d_item_name2)}</div>
                        </div>
                    </div>
                    <div class="avg-item mt-5">
                        <div class="status-view-data">
                            <div class="status-view-data-label min">道具</div>
                            <div class="status-view-data-value flex-1 width-0">${re_arm_name(d_item2_name2)}</div>
                        </div>
                    </div>
                </div>
                <div class="section-title mt-50">战斗属性</div>
                <div class="status-view-data">
                    <div class="status-view-data-label min">HP</div>
                    <div class="status-view-data-value flex-1 width-0"
                         style="color:#fff;background:linear-gradient(90deg,#a32700 ${(p_hp / p_hpmax).toFixed(2) * 100}%,transparent 0%)">
                         ${p_hp} / ${p_hpmax}
                    </div>
                </div>
                <div class="status-view-data">
                    <div class="status-view-data-label min">SP</div>
                    <div class="status-view-data-value flex-1 width-0"
                         style="color:#fff;background:linear-gradient(90deg,#006a99 ${(sp / spmax).toFixed(2) * 100}%,transparent 0%)">${translateNumber(sp)} / ${translateNumber(spmax)}</div>
                </div>
                <div class="status-view-data">
                    <div class="status-view-data-label min">物攻</div>
                    <div class="status-view-data-value flex-1 width-0">${translateNumber(p_at)}</div>
                </div>
                <div class="status-view-data">
                    <div class="status-view-data-label min">魔攻</div>
                    <div class="status-view-data-value flex-1 width-0">${translateNumber(p_mat)}</div>
                </div>
                <div class="status-view-data">
                    <div class="status-view-data-label min">物防</div>
                    <div class="status-view-data-value flex-1 width-0">${translateNumber(p_df)}</div>
                </div>
                <div class="status-view-data">
                    <div class="status-view-data-label min">魔防</div>
                    <div class="status-view-data-value flex-1 width-0">${translateNumber(p_mdf)}</div>
                </div>
            </div>
            <div class="status-view-info flex-1  px-15">
                <div class="section-title mt-10">角色信息</div>
                <div class="status-view-data">
                    <div class="status-view-data-label min">等级</div>
                    <div class="status-view-data-value flex-1 width-0">${p_lv}</div>
                </div>
                <div class="status-view-data">
                    <div class="status-view-data-label min">经验</div>
                    <div class="status-view-data-value flex-1 width-0">${translateNumber(p_exp)} / ${translateNumber(p_nextexp)}</div>
                </div>
                <div class="status-view-data">
                    <div class="status-view-data-label min">职业</div>
                    <div class="status-view-data-value flex-1 width-0">${d_ch_name2}</div>
                </div>
                <div class="status-view-data">
                    <div class="status-view-data-label min">荣誉</div>
                    <div class="status-view-data-value flex-1 width-0">${0}</div>
                </div>
                <div class="status-view-data">
                    <div class="status-view-data-label min">工会</div>
                    <div class="status-view-data-value flex-1 width-0">${group_name}</div>
                </div>
                <div class="section-title mt-10">其他信息</div>
                <div class="status-view-data">
                    <div class="status-view-data-label min">金钱</div>
                    <div class="status-view-data-value flex-1 width-0">${translateNumber(p_money)}</div>
                </div>
                <div class="status-view-data">
                    <div class="status-view-data-label ">行动力</div>
                    <div class="status-view-data-value flex-1 width-0">${act_num}</div>
                </div>
                <div class="status-view-data">
                    <div class="status-view-data-label ">冒险地</div>
                    <div class="status-view-data-value flex-1 width-0">${sec[p_place][0]}</div>
                </div>
                <div class="status-view-data">
                    <div class="status-view-data-label ">出生地</div>
                    <div class="status-view-data-value flex-1 width-0">${my_birth2}</div>
                </div>
                <div class="status-view-data">
                    <div class="status-view-data-label min">胜率</div>
                    <div class="status-view-data-value flex-1 width-0">${Math.floor(p_win / (p_win + p_lost) * 100)}%</div>
                </div>
                <div class="status-view-data">
                    <div class="status-view-data-label min">场次</div>
                    <div class="status-view-data-value flex-1 width-0"><span class="text-white">胜</span>${translateNumber(p_win)} / <span class="text-white">负</span>${translateNumber(p_lost)}</div>
                </div>
                <div class="status-view-data">
                    <div class="status-view-data-label min">连胜</div>
                    <div class="status-view-data-value flex-1 width-0">${typeof win_num !== 'undefined' && win_num > 0 ? '已连胜' + win_num + '场' : '无'} </div>
                </div>

            </div>
        </div>
    </div>
</div>
`)
    // w_c('<td class="table-attr-name">性别</td><td ><b>' + sex + ' ' + my_age2 + '岁</b></td></tr>')
// 	if((win_num == undefined || win_num == 0) && p_name2==p_name)
// 	{
// 		rest_up='(<a class="uline" onclick="if(confirm(\'重新分配升级能力点数，需消耗 3 游戏点，确定是否使用?\')){parent.act_click(\'mall\',\'restup\');}">配点</a>)';
// 	}
};

/**
 * 重置装备名称
 * @param a1
 * @returns {string|*}
 */
function re_arm_name(a1) {
    return (a1.toString() === "") ? "　" : a1;
};

function no_cp(del_day, f_time) {
    w_c('<table border=0 width="100%">');
    w_c('<tr>');
    w_c('<td valign="top">');
    chara_make(del_day, f_time);
    w_c('</td>');
    w_c('</tr>');
    w_c('</table>');
    p_c();
};

/**
 * 计算数据
 * @param p
 * @param s
 * @returns {number}
 */
function get_f(p, s) {
    p = (p / s) * 100;
    if (p > 100) {
        p = 100;
    }
    return p;
};

/**
 * 创建角色
 * @param del_day
 * @param f_time
 */
function chara_make(del_day, f_time) {
    //<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" target="_blank"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a><br />
    w_c('<span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/InteractiveResource" property="dc:title" rel="dc:type">WOG</span>由<a xmlns:cc="http://creativecommons.org/ns#" href="http://www.et99.net" property="cc:attributionName" rel="cc:attributionURL" target="_blank">ETERNAL</a>制作，以<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" target="_blank">创用CC 姓名标示-非商业性-相同方式分享 3.0 通用版 授权条款</a>释出。此作品衍生自<a href="http://www.et99.net" target="_blank">www.et99.net</a>。');
    w_c('<form action="wog_act.php" method="post" name="f1" target="mission">');
    w_c('<table class="create-player">');
    w_c('<tr><td>帐号:<input type="text" size="10" name="id" value="" > 密码:<input type="password" size="10" name="pass" value="" ></td></tr>');
    w_c('<input type="hidden" name="set_frame" value="2"/>')
    w_c('<tr><td><input type="submit" name="ppp" value="登录"> <input type="button" value="创造新角色" onclick="parent.act_click(\'chara\',\'make\')"></td></tr>');
    w_c('</table>');
    w_c('<input type="hidden" name="f" value="chara"><input type="hidden" name="act" value="login"></form>');
    w_c('<OL>');
    w_c('<center><FONT COLOR="#FF0000"><b>WOG-游戏方式</b></FONT></center>');
    w_c('<LI>点选“<a onclick="parent.act_click(\'chara\',\'make\')" class="uline">创造新角色</a>”按钮，创立新角色。');
    w_c('<LI>角色创立之后，便可利用设定的帐号和密码进入游戏。');
    w_c('<LI>在个人专属舞台里，你可以进行动作选择。');
    w_c('<LI>每场战役结束后，必须经过<FONT COLOR="#FF0000"><b>' + f_time + '</b></FONT>秒才可以再进行下一场战役!!');
    w_c('</OL>');
    setUI(1);
};

/**
 * 冠军界面
 * @param sname
 * @param s
 */
function king_view(sname, s) {
    w_c(temp_table1);
    w_c(king_menu);
    w_c(temp_table2);
    w_c(hr);
    w_c(temp_table1);
    w_c('<tr class=head_td><td height="0" colspan="3" rowspan="0" >' + sname + '</td></tr>');
    var s1 = s.split(";");
    for (var i = 0; i < s1.length; i++) {
        var s2 = s1[i].split(",");
        var p_img_url = s2[0];
        if (p_img_url.indexOf("http") == -1 && p_img_url.indexOf("ftp") == -1) {
            p_img_url = '<img src="' + img + p_img_url + '.gif" border="0">';
        } else {
            p_img_url = '<img src="' + p_img_url + '" border="0">';
        }
        w_c('<tr><td  width="110">' + p_img_url + '</td><td >' + s2[1] + '</td><td >' + s2[2] + '</td></tr>');
    }
    w_c(temp_table2);
    p_c();
};

function hero_view(a) {
    w_c(temp_table1);
    var s1 = a.split(";");
    for (var i = 0; i < s1.length; i++) {
        var s2 = s1[i].split(",");
        var p_img_url = s2[0];
        var hero_title = "";
        switch (s2[2]) {
            case '2':
                hero_title = "不败英雄";
                break;
            case '3':
                hero_title = "幻魔英雄";
                break;
            case '4':
                hero_title = "神风英雄";
                break;
            case '5':
                hero_title = "钢铁英雄";
                break;
            case '6':
                hero_title = "结界英雄";
                break;
            case '7':
                hero_title = "魅心英雄";
                break;
            case '8':
                hero_title = "武术英雄";
                break;
            case '9':
                hero_title = "兽王英雄";
                break;
        }
        w_c('<tr class="head_td"><td height="0" colspan="2" >' + hero_title + '(重置日期：' + s2[3] + ')</td></tr>');
        if (p_img_url.indexOf("http") == -1) {
            p_img_url = '<img src="' + img + p_img_url + '.gif" border="0">';
        } else {
            p_img_url = '<img src="' + p_img_url + '" border="0">';
        }
        w_c('<tr><td width="110">' + p_img_url + '</td><td>' + s2[1] + '</td></tr>');
    }
    w_c(temp_table2);
    p_c();
};

function chara_make_view(total_point, s1, s2, s3) {
    message_cls();
    var temp_i_id = [];
    var temp_ch = [];
    temp_st = ["str", "smart", "life", "agi"];
    temp_i_id = s1.split(",");
    temp_ch = s2.split(";");
    let pic_option = '';
    let pro_option = '';
    let point_td = '';
    for (let i = 0; i < temp_i_id.length; i++) {
        pic_option += '<option value="' + temp_i_id[i] + '" >' + temp_i_id[i];
    }

    for (let i = 0; i < temp_ch.length; i++) {
        temp_c = temp_ch[i].split(",");
        pro_option += '<option value="' + temp_c[0] + '" >' + temp_c[1];
    }

    for (let j = 0; j < 4; j++) {
        point_td += '<td class="b1"><select name=' + temp_st[j] + '>';
        for (let i = 1; i < 11; i++) {
            point_td += '<option value="' + i + '">+' + i;
        }
        point_td += '</select></td>';
    }
    w_c(`<div id="createPlayerVM" class="bg-primary text-gold create-player">
    <div class="box-border-gradient">
        <form action="wog_act.php" method="post" target="mission">
            <div class="b1">角色名称：<input type="text" class="game-input" name="id" size="10" maxlength="12" class="style1"> 请勿输入{ } ; &lt;
                &gt; , " ' \\ 等符号
            </div>
            <div class="b1">角色密码：<input type="password" class="game-input" name="pass" size="10" class=style1> 请输入4～8字内的半形英数。</div>
<!--            <div class="b1">玩家email：<input type="text" class="game-input" name="email" size="50" class=style1> 补发密码使用</div>-->
<input type="hidden" value="noset@${new Date().getTime()}.com" name="email"> 
            <div class="b1">角色性别：<input type="radio"name="sex" value="2">女　<input type="radio" name="sex" value="1">男　★请选择角色的性别。
            </div>
            <div class="b1">角色属性：
                <label><input type="radio" name="s" value="1">地</label>
                <label><input type="radio" name="s" value="2">水</label>
                <label><input type="radio" name="s" value="3">火</label>
                <label><input type="radio" name="s" value="4">木</label>
                <label><input type="radio" name="s" value="5">风</label>
                <label><input type="radio" name="s" value="6">毒</label> ★请选择角色的属性
            </div>
            <div class="b1">出生地点：
                <label><input type="radio" name="birth" value="1">中央大陆</label>
                <label><input type="radio" name="birth" value="2">魔法王国</label>
                <label><input type="radio" name="birth" value="3">热带雨林</label>
                <label><input type="radio" name="birth" value="4">末日王城</label>
            </div>
            <div class="b1">角色图像：
                <select name="i_id" class="game-select">${pic_option}</select>
                <a href="javascript:;"
                   onClick="window.open('wog_etc.php?f=img','','menubar=no,status=no,scrollbars=yes,top=50,left=50,toolbar=no,width=400,height=400')"><font
                            size="2">★图像预览★</font></a>
                <br>　　　　★请选择角色的图片。
            </div>
            <div class="b1">角色职业：<select name="ch" class="game-select">${pro_option}</select></div>
            <div class="b1">角色能力： 基本值 <strong>10</strong>
                <table border="1" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="b2" width="70">力量 10</td>
                        <td class="b2" width="70">智力 10</td>
                        <td class="b2" width="70">生命 10</td>
                        <td class="b2" width="70">敏捷 10</td>
                    </tr>
                    <tr class=head_td3>
                        ${point_td}
                    </tr>
                    <tr>
                        <td colspan="4" class="b1">★你共有“<font color="#FF0000"><b>${total_point}</b></font>”点的加分点数可增加能力值，请自行分配。分配总和超出<font
                                    color="#FF0000"><b>${total_point}</b></font>以上则无法注册。
                        </td>
                    </tr>
                </table>
            </div>
            <div class="b1">必杀技名称：<input type="text" name="sat_name" size="40" maxlength="40" class="style1">
                请输入你必杀技的名称。
                请勿输入{ } ; &lt; &gt; , " ' \\ 等符号
            </div>
            <div align="center"><input type="submit" class="brick-btn" value="确定创建"> 已经有帐号→
                [<a href="javascript:;" class="text-prompt"
                    onclick="parent.document.getElementById('wog_view').src='./../views/player.php';">立即登录</a>]
                >
            </div>
            <input type="hidden" name="f" value="chara">
            <input type="hidden" name="act" value="save">
            <input type="hidden" name="recommid" value="${s3}">
        </form>
    </div>
</div>`);
    p_c();
    setUI(1);
};

function check_creat(a1) {
    w_c(temp_table1);
    switch (a1) {
        case 1:
            w_c('<tr><td>角色建立成功,系统已发送验证信到你的信箱,请查收认证信通过验证才能登入角色(收不到验证信时请查看是否在垃圾邮件里面，建议使用Google或Hotmail)</td></tr>');
            break;
    }
    w_c(temp_table2);
    p_c();
};

function start_tips(a1, a2, a3, a4, a5) {
    console.log('start_tips')
    var t = '';
    t += '<form>';
    t += temp_table1;
    var s1 = a5.split(",");
    t += '</table></td>';
    //右边窗口 begin
    t += '<td><table align="center" width="100%">';
    t += '<tr class="head_td2"><td colspan="2">推荐冒险地点 : ' + a4 + '</td></tr>';
    if (p_lv2 > 1) {
        if (a1 != "") {
            t += '<tr class="head_td"><td colspan="2">推荐可接任务</td></tr>';
            var s1 = a1.split(";");
            t += '<tr class="head_td"><td>委托者</td><td>主题</td></tr>';
            for (var i = 0; i < s1.length; i++) {
                var s2 = s1[i].split(",");
                t += '<tr onmouseover="this.class=\'on_td\';" onmouseout="this.class=\'un_td\';" class="un_td"><td>' + s2[1] + '</td><td><a href="javascript:parent.act_click(\'mission\',\'detail\',' + s2[0] + ')">' + s2[2] + '</a></td></tr>';
            }
            t += '<tr class="head_td2"><td colspan="2"><a class="uline" onClick="parent.act_click(\'mission\',\'list\')">【进入任务介绍所】</a></td></tr>';
        }
    } else {
        t += '<tr class="head_td"><td colspan="2">新手提示</td></tr>';
        t += '<tr><td colspan="2" class=b1>这里是四个国家共同建立的WOG世界，新手要在这世界生存请善用下面功能<ol><li>可从<a href=parent.mission_ed()>【任务手册】</a>里面的任务介绍所接任务，新手推荐先接‘新手入门’任务</li>';
        t += '<li>可从<a href=parent.select_store()>【商店街】</a>进入商店购买装备、公会、团队、佣兵所、牧场等</li>';
        t += '<li>在<a href=parent.act_click(\'mercenary\',\'view\')>【佣兵所】</a>可以购买佣兵替您自动战斗</li>';
        t += '<li>在<a href=parent.act_click(\'job\',\'view\')>【职业中心】</a>可以随时改变您的职业，并在<a href=parent.job_list();>【技能大师】</a>学习你想使用的技能</li>';
        t += '<li>利用<a href=parent.act_click(\'skill\',\'view\')>【技能手册】</a>可以随时改变您战斗中使用的技能</li>';
        t += '</ol></td></tr>';
    }
    t += '<tr class="head_td"><td colspan="2">现有荣誉:<b>' + a2 + '</b> (荣誉必须加入公会才能获得)</td></tr>';
    if (a3 != "") {
        t += '<tr class="head_td"><td colspan="2">↓荣誉可兑换物品↓</td></tr>';
        t += '<tr><td colspan="2"><table align="center">';
        var s1 = a3.split(";");
        for (var i = 0; i < s1.length; i++) {
            var s2 = s1[i].split(",");
            if ((i + 1) % 3 == 1) {
                t += '<tr>';
            }
            t += '<td width="150"><a class=uline onclick=parent.arm_show(event.ctrlKey,"' + s2[1] + '","' + s2[0] + '")>' + s2[1] + '</a></td>';
            if ((i + 1) % 3 == 0) {
                t += '</tr>';
            }
        }
        t += '</td></tr></table><tr class="head_td2"><td colspan="2"><a class="uline" onClick="parent.act_gclick(\'depot\',\'depot_list\')">【进入公会仓库】</a></td></tr>';
    }
    t += '<tr class="head_td"><td colspan="2"><input type="checkbox" onclick="parent.set_well_box()" ' + return_well_box() + '>不再显示友善消息</td></tr>';
    t += '</table></td></tr>';
    //右边窗口 end
    t += temp_table2;
    t += "</form>";
    wog_message_box(t, 5);
};
